package com.example.springapp.service;

import com.example.springapp.mapper.LoginMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Component  // 接受spring容器管理
public class LoginService {
    @Autowired
    private LoginMapper loginMapper;
    public boolean login(String usercode,String userpwd){
//        run LoginService... org.apache.ibatis.binding.MapperProxy@df0739e
        System.out.println("run LoginService... " + loginMapper);

        boolean success = loginMapper.login(usercode,userpwd);
        return success;
    }
}
